import sys
import os


if __name__ == "__main__":
    devEnv = False
    try:
        if len(sys.argv) == 2:
            if sys.argv[1] == 1:
                devEnv = True
            elif sys.argv[1] == 0:
                devEnv = False
            else:
                print("unknow this argument=[%s], use defualt value" % sys.argv[1])
        else:
            print("cl argument count invalid, use default value")
    except Exception as err:
        print("cl argument count invalid, use default value")

    os.system("chmod +x ./main")
    if devEnv:
        os.system("./main")
    else:
        os.system("./main")